package com.dragon.modules.yuegou.model.product;

import com.dragon.modules.yuegou.entity.product.SeckillRecordEntity;
import com.dragon.modules.yuegou.enums.product.SeckillRecordStatus;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 模型类
 * 
 * @author ljf
 * @date 2019-07-29 14:24:32
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class SeckillRecord extends SeckillRecordEntity {

	/**
	 * 构造一个空模型对象
	 */
	public SeckillRecord(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个模型对象
	 * 
	 * @param entity 实体对象
	 */
	public SeckillRecord(SeckillRecordEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个模型对象
	 * 
	 * @param other 其它对象
	 */
	public SeckillRecord(SeckillRecord other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置
	 * 
	 * @param id 
	 * @return 当前对象
	 */
    public SeckillRecord id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getSeckillId() {
    	return seckillId;
    }

    /**
	 * 设置
	 * 
	 * @param seckillId 
	 * @return 当前对象
	 */
    public SeckillRecord seckillId(String seckillId) {
    	this.seckillId = seckillId;
    	return this;
    }

	@Override
	public String getBusdId() {
    	return busdId;
    }

    /**
	 * 设置
	 * 
	 * @param busdId 
	 * @return 当前对象
	 */
    public SeckillRecord busdId(String busdId) {
    	this.busdId = busdId;
    	return this;
    }

	@Override
	public LocalDateTime getBuyTime() {
    	return buyTime;
    }

    /**
	 * 设置购买的日期
	 * 
	 * @param buyTime 购买的日期
	 * @return 当前对象
	 */
    public SeckillRecord buyTime(LocalDateTime buyTime) {
    	this.buyTime = buyTime;
    	return this;
    }

	@Override
	public SeckillRecordStatus getStatus() {
    	return status;
    }

    /**
	 * 设置[枚举]状态：0-正常-NORMAL、1-退款-DISABLE
	 * 
	 * @param status [枚举]状态：0-正常-NORMAL、1-退款-DISABLE
	 * @return 当前对象
	 */
    public SeckillRecord status(SeckillRecordStatus status) {
    	this.status = status;
    	return this;
    }

	@Override
	public String getMemberId() {
    	return memberId;
    }

    /**
	 * 设置
	 * 
	 * @param memberId 
	 * @return 当前对象
	 */
    public SeckillRecord memberId(String memberId) {
    	this.memberId = memberId;
    	return this;
    }

	@Override
	public String getOrderNo() {
    	return orderNo;
    }

    /**
	 * 设置
	 * 
	 * @param orderNo 
	 * @return 当前对象
	 */
    public SeckillRecord orderNo(String orderNo) {
    	this.orderNo = orderNo;
    	return this;
    }

	@Override
	public LocalDateTime getOrderTime() {
    	return orderTime;
    }

    /**
	 * 设置
	 * 
	 * @param orderTime 
	 * @return 当前对象
	 */
    public SeckillRecord orderTime(LocalDateTime orderTime) {
    	this.orderTime = orderTime;
    	return this;
    }
}
